package com.tao.mapper;

import com.github.pagehelper.Page;
import com.tao.pojo.dto.PageSearchOrtderDto;
import com.tao.pojo.entity.Order;
import com.tao.pojo.vo.OrderSearchVo;
import com.tao.pojo.vo.OrderStatisticVo;
import com.tao.pojo.vo.OrderVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

@Mapper
public interface OrderStoreMapper {
    Page<OrderSearchVo> orderSearch(PageSearchOrtderDto pageSearchOrtderDto);

    Integer orderStatisticStatus(@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime start , @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime end, Integer status);

    @Select("select * from orders where id=#{id}")
    Order getOrderById(Integer id);

    void updateOrder(Order order);


}
